/**
* @file OffGroundSwitchData.h
* @author
* @brief 离地开关数据类型
* @version 1.0
* @date 2021-01-01
*
* @copyright Copyright (c) 2021
*
*/

#pragma once

#include <cstdint>
#include "data_struct/robot/Pose.h"
#include "lib/Time.h"

namespace behavior_controller
{

class OffGroundSwitchData
{
public:
    OffGroundSwitchData() {};

    void SetData(bool data)
    {
        is_switch = data;
        real_time = Time::Now();
        if (data) { time = real_time; }
    }

    double GetTime() { return time; }

    double GetRealTime() { return real_time; }

    bool GetData() { return is_switch; }

private:
    double time = 0;
    double real_time = 0;
    bool is_switch = false;
};

} // namespace behavior_controller
